package com.framework.mock;


import com.github.tomakehurst.wiremock.junit.WireMockRule;
import org.junit.Rule;
import org.junit.Test;

import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;


public class WireMockTest {
    @Rule
    public WireMockRule service1  = new WireMockRule(options().port(8888));

    @Test
    public void test() throws InterruptedException {
        service1.stubFor(get(urlEqualTo("/blah"))
                        .willReturn(aResponse()
                                .withBody("hello")));
        Thread.sleep(5000);
    }
}
